package com.ruoyi.TraditionalCultureSys.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.TraditionalCultureSys.mapper.TraditionalFestivalsMapper;
import com.ruoyi.TraditionalCultureSys.domain.TraditionalFestivals;
import com.ruoyi.TraditionalCultureSys.service.ITraditionalFestivalsService;

/**
 * 节庆活动Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-24
 */
@Service
public class TraditionalFestivalsServiceImpl implements ITraditionalFestivalsService 
{
    @Autowired
    private TraditionalFestivalsMapper traditionalFestivalsMapper;

    /**
     * 查询节庆活动
     * 
     * @param id 节庆活动主键
     * @return 节庆活动
     */
    @Override
    public TraditionalFestivals selectTraditionalFestivalsById(Long id)
    {
        return traditionalFestivalsMapper.selectTraditionalFestivalsById(id);
    }

    /**
     * 查询节庆活动列表
     * 
     * @param traditionalFestivals 节庆活动
     * @return 节庆活动
     */
    @Override
    public List<TraditionalFestivals> selectTraditionalFestivalsList(TraditionalFestivals traditionalFestivals)
    {
        return traditionalFestivalsMapper.selectTraditionalFestivalsList(traditionalFestivals);
    }

    /**
     * 新增节庆活动
     * 
     * @param traditionalFestivals 节庆活动
     * @return 结果
     */
    @Override
    public int insertTraditionalFestivals(TraditionalFestivals traditionalFestivals)
    {
        return traditionalFestivalsMapper.insertTraditionalFestivals(traditionalFestivals);
    }

    /**
     * 修改节庆活动
     * 
     * @param traditionalFestivals 节庆活动
     * @return 结果
     */
    @Override
    public int updateTraditionalFestivals(TraditionalFestivals traditionalFestivals)
    {
        return traditionalFestivalsMapper.updateTraditionalFestivals(traditionalFestivals);
    }

    /**
     * 批量删除节庆活动
     * 
     * @param ids 需要删除的节庆活动主键
     * @return 结果
     */
    @Override
    public int deleteTraditionalFestivalsByIds(Long[] ids)
    {
        return traditionalFestivalsMapper.deleteTraditionalFestivalsByIds(ids);
    }

    /**
     * 删除节庆活动信息
     * 
     * @param id 节庆活动主键
     * @return 结果
     */
    @Override
    public int deleteTraditionalFestivalsById(Long id)
    {
        return traditionalFestivalsMapper.deleteTraditionalFestivalsById(id);
    }

    @Override
    public List<TraditionalFestivals> getAllTraditionalFestivals() {
        return traditionalFestivalsMapper.getAllTraditionalFestivals();
    }
}
